import React from 'react';
import { connect } from "react-redux";
import {
  RecommendWrapper,
  RecommendItem
} from "../style";

class Recommend extends React.PureComponent {
  render() { 
    const { recommendList } = this.props;
    return (
      <RecommendWrapper>
        {
          recommendList.map(item => {
            return (
              <RecommendItem
                key={item.get('id')}
                alt=""
                imgUrl={item.get('imgUrl')}
              ></RecommendItem>
            )
          })
        }
      </RecommendWrapper>
    );
  }
}

const mapStateToProps = (state) => {
  return {
    recommendList: state.getIn(['home', 'recommendList'])
  }
}

const mapDispatchToProps = (dispatch) => {
  return {

  }
}
 
export default connect(mapStateToProps, mapDispatchToProps)(Recommend);